<!doctype html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <title>jq-test</title>
    <script src="http://lib.sinaapp.com/js/jquery/1.7.2/jquery.min.js"></script>
    <script src="http://cdn.jsdelivr.net/ramda/latest/ramda.min.js"></script>
    <script src="../src/ramda-jq.js"></script>
    <style>
        [hover-up] {
            border: red 1px solid;
            width: 100px;
            position: relative;
        }
        [hover] {
            position: absolute;
            color: white;
            background: red;
            top: 21px;
            z-index: 100;
            display: none;
        }
    </style>
</head>

<body>
    <div hover-up="">
        <a href="">dadaffd</a>
        <div hover="">
            <button msg-path="msg.1">click me</button>
        </div>
    </div>
    <div hover-up="">
        <a href="">dadaffd</a>
        <div hover="">
            iiiiiiddddddd
            <button msg-path="msg.0">click me</button>
        </div>
    </div>
    <script>
        var data = {
            msg: ["000000000", "1111111111"]
        };
        var pipe = R.pipe,
            split = R.split,
            jqpipe = ui.jqpipe;
        var watch = pipe(
            ui.on("click", jqpipe(ui.attr("title"), R.concat("hello "), alert)),
            pipe(ui.find("[hover-up]"), ui.hoverToogle500(ui.find("[hover]"))),
            pipe(ui.find("[msg-path]"), ui.on("click", jqpipe(ui.attr("msg-path"), R.split("."), R.path(R.__, data), alert)))
        );
        watch($(document));
    </script>
</body>

</html>
